package com.runssnail.juhe.api.response;

import com.runssnail.juhe.api.domain.BaseDomain;

import java.util.Map;

/**
 * api response
 *
 * @author zhengwei
 */
public abstract class Response extends BaseDomain {

    /**
     *
     */
    private static final long serialVersionUID = -5684236406783615047L;

    /**
     * 响应body
     */
    private String responseBody;

    /**
     * 错误码
     */
    private String error_code;

    /**
     * 错误信息
     */
    private String reason;

    public String getResponseBody() {
        return responseBody;
    }

    public void setResponseBody(String responseBody) {
        this.responseBody = responseBody;
    }

    /**
     * 是否成功
     *
     * @return
     */
    public boolean isSuccess() {
        return "0".equals(this.error_code);
    }

    public String getError_code() {
        return error_code;
    }

    public void setError_code(String error_code) {
        this.error_code = error_code;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }
}
